//
//  ICQueryViewController.h
//  Iching
//
//  Created by Leonardo Celati on 27/12/09.
//  Copyright 2009 Web & Zen Multimedia. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ICQueryView.h"
#import "ICTossView.h"
#import "IChingDef.h"
#import "ICResponseView.h"
#import "ICFactory.h"

@interface ICQueryViewController : UIViewController  <UITextFieldDelegate> {
	// view element
	ICQueryView *icQueryView; // just the view
	ICResponseView *icResponseView; // where the response is displayed
/*	UITextField *consultantName; // the consultant who asked for a response
	UITextField *queryText; // the text field for user question
	UIButton *startQueryButton; // start
	UIButton *stopQueryButton; // stop
*/	
	// operational variable
	int launched; // shake count
	//Line response[6]; // where response will go
	Hexagram origin;
	Hexagram mutate;
	NSTimeInterval start;
	NSTimeInterval stop;
	NSMutableArray *response;
	
}

@property (nonatomic,retain) IBOutlet ICQueryView *icQueryView;
@property (nonatomic,retain) IBOutlet ICResponseView *icResponseView;
/*@property (nonatomic,retain) IBOutlet UITextField *queryText;
@property (nonatomic,retain) IBOutlet UITextField *consultantName;
@property (nonatomic,retain) IBOutlet UIButton *startQueryButton;
@property (nonatomic,retain) IBOutlet UIButton *stopQueryButton;
*/
 
// stop our query
-(IBAction) stopQuery:(id)sender;

// when we shake we toss coins
-(Line)throwCoins:(NSString*)question withShakingInterval:(NSTimeInterval)interval;

// display the launch
-(void)buildTossView;

// display final response
-(void)buildResponseView;

// lock all elements on view
-(void)lockView;

// unlock all elements on view
-(void)unlockView;








@end
